<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>01-flex-direction</title>
    <style>
        .box {
            display: flex;
            width: 500px;
            height: 200px;
            border: red dashed 1px;
            margin-bottom: 30px;
        }

        .box1 {
            flex-direction: row;
        }

        .box-item {
            width: 100px;
            height: 100px;
            line-height: 100px;
            font-size: 50px;
            text-align: center;
            margin: 5px;
            background-color: yellow;
        }
        .box-item {
            align-self: auto;
        }

        .box2 {
            align-items: center;
        }

        .box-item2.item3 {
            align-self: flex-start;
        }

        .box-item3.item3 {
            align-self: flex-end;
        }

        .box-item4.item3 {
            align-self: center;
        }

        .box-item5 {
            text-decoration: underline;
            align-self: baseline;
            font-size: 35px;
        }

        .box-item5.item2 {
            font-size: 55px;
        }

        .box-item5.item3 {
            font-size: 75px;
        }

        .box-item5.item4 {
            font-size: 95px;
        }

        .box-item6 {
            align-self: stretch;
        }

        .box-item6.item3 {
            font-size: 75px;
            height: auto;
        }
    </style>
</head>
<body>
<div class="box box1">
    <div class="box-item box-item1 item1">1</div>
    <div class="box-item box-item1 item2">2</div>
    <div class="box-item box-item1 item3">3</div>
    <div class="box-item box-item1 item4">4</div>
</div>

<div class="box box2">
    <div class="box-item box-item2 item1">1</div>
    <div class="box-item box-item2 item2">2</div>
    <div class="box-item box-item2 item3">3</div>
    <div class="box-item box-item2 item4">4</div>
</div>

<div class="box box3">
    <div class="box-item box-item3 item1">1</div>
    <div class="box-item box-item3 item2">2</div>
    <div class="box-item box-item3 item3">3</div>
    <div class="box-item box-item3 item4">4</div>
</div>

<div class="box box4">
    <div class="box-item box-item4 item1">1</div>
    <div class="box-item box-item4 item2">2</div>
    <div class="box-item box-item4 item3">3</div>
    <div class="box-item box-item4 item4">4</div>
</div>

<div class="box box5">
    <div class="box-item box-item5 item1">1</div>
    <div class="box-item box-item5 item2">2</div>
    <div class="box-item box-item5 item3">3</div>
    <div class="box-item box-item5 item4">4</div>
</div>

<div class="box box6">
    <div class="box-item box-item6 item1">1</div>
    <div class="box-item box-item6 item2">2</div>
    <div class="box-item box-item6 item3">3</div>
    <div class="box-item box-item6 item4">4</div>
</div>
</body>
</html>
